home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / news / inn1.000 / inn1.4sec-linux-src.tar / inn / lib / xmemerr.c < prev    next >
C/C++ Source or Header  |  1992-02-21  |  474b  |  26 lines

  1. /*  $Revision: 1.3 $
  2. **
  3. */
  4. #include <stdio.h>
  5. #include <sys/types.h>
  6. #include <errno.h>
  7. #include "configdata.h"
  8. #include "clibrary.h"
  9.  
  10.  
  11. /*
  12. **  Memory failure handler; print an error and exit.
  13. */
  14. STATIC int
  15. xmemerr(what, i)
  16.     char        *what;
  17.     unsigned int    i;
  18. {
  19.     /* We want large values to show up as negative, hence %d. */
  20.     (void)fprintf(stderr, "Can't %s %d bytes, %s", what, i, strerror(errno));
  21.     exit(1);
  22.     /* NOTREACHED */
  23. }
  24.  
  25. int (*xmemfailure)() = xmemerr;
  26.